package com.yi.mall.user;

import com.yi.mall.common.model.UserInfo;
import com.yi.mall.user.service.impl.UserInfoServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mindrot.jbcrypt.BCrypt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class test {
    @Autowired
    private UserInfoServiceImpl userInfoService;


    @Test
    public void test1() {
        UserInfo admin = userInfoService.getUserInfoByUserName("admin");
        System.out.println(admin);
    }

        @Test
        public void encrypt() {
            // 生成密码
            String hashpw = BCrypt.hashpw("123456", BCrypt.gensalt());
            System.out.println(hashpw);
        }
//    @Test
//    public void test2() {
//        Result result = goodsFeignClient.getcategoryList();
//        Object data = result.getData();
//        System.out.println(data.toString());
//    }
}

